﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc; 
using System.Web.Mvc.Html;

namespace BOSS.Web.Extensions
{
    public static class TextBoxExtensions
    {
        private static IDictionary<string, object> extClass = new Dictionary<string, object>() 
        { 
            { "class", "x-form-text x-form-field" }
        };

        public static string TextField(this HtmlHelper helper, string name)
        {
            return helper.TextBox(name, "", extClass);
        }

        public static string TextField(this HtmlHelper helper, string name, object value)
        {
            return helper.TextBox(name, value, extClass);
        }

        public static string TextField(this HtmlHelper helper, string name, object value, object htmlAttributes)
        {
            return helper.TextBox(name, value, new { Class = "x-form-text x-form-field" });
        }
    }
}
